/*
    Style for Table of Contents sidebar like Bootstrap.com's with scrollspy
    Code from: http://jsfiddle.net/KyleMit/v6zhz/170
    See: http://www.codingeverything.com/2014/02/BootstrapDocsSideBar.html
*/

#sidebar.affix {
    top: 0px;
    padding-top: 20px;
    bottom: 0px;
    padding-bottom: 20px;
    overflow: auto;
}
#sidebar.affix .hide-affix-top {
    display: block;
}
#sidebar.affix-top .hide-affix-top {
    display: none;
}
@media only screen and (max-width: 1199px) { #sidebar.affix { width: 205px; } }
@media only screen and (min-width: 1200px) { #sidebar.affix { width: 255px; } }

/* float a tiny icon TOC for smaller screens */
@media only screen and (max-width: 991px) {
    #toc #sidebar.affix {
        z-index: 1;
        top: 5px; right: 10px;
        width: 30px; height: 30px;
        overflow: hidden;
        background-color: transparent;
        border: 0.5px solid #08608A;
        border-radius: 5px;
        box-shadow: 1px 1px 10px #888;
        /* make sure TOC doesn't take up the whole screen */
        bottom: auto;
        padding-bottom: 0px;
        overflow: auto;
    }
    #toc #sidebar.affix       > li { visibility:  hidden; }
    #toc #sidebar.affix:hover > li { visibility: visible; }
    #toc #sidebar.affix:hover > li:first-child { margin-right: 30px; } /* XXX to prevent tap on mobile */
    #toc #sidebar.affix:hover {
        background-color: #FFFFFF;
        padding: 20px;
        width: auto; height: auto;
        overflow: auto;
    }
}

/* sidebar */
.bs-docs-sidebar {
    padding-left: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
}

/* all links */
.bs-docs-sidebar .nav>li>a {
    color: #999;
    border-left: 2px solid transparent;
    padding: 4px 20px;
    font-size: 14px;
    font-weight: 700;
}

/* nested links */
.bs-docs-sidebar .nav .nav>li>a {
    padding-top: 1px;
    padding-bottom: 1px;
    padding-left: 30px;
    font-size: 13px;
    font-weight: 400;
}

/* deeply nested links */
.bs-docs-sidebar .nav .nav .nav>li>a {
    padding-top: 0px;
    padding-bottom: 0px;
    padding-left: 40px;
    font-size: 12px;
}


/* active & hover links */
.bs-docs-sidebar .nav>.active>a,
.bs-docs-sidebar .nav>li>a:hover,
.bs-docs-sidebar .nav>li>a:focus {
    color: #08608A;
    text-decoration: none;
    background-color: transparent;
    border-left-color: #08608A;
}
/* all active links */
.bs-docs-sidebar .nav>.active>a,
.bs-docs-sidebar .nav>.active:hover>a,
.bs-docs-sidebar .nav>.active:focus>a {
    font-weight: 700;
}
/* nested active links */
.bs-docs-sidebar .nav .nav>.active>a,
.bs-docs-sidebar .nav .nav>.active:hover>a,
.bs-docs-sidebar .nav .nav>.active:focus>a {
    font-weight: 500;
}

/* hide inactive nested list */
.bs-docs-sidebar .nav .nav {
    display: none;
}
/* show active nested list */
.bs-docs-sidebar .nav>.active>.nav {
    display: block;
}
